<div class="product">
      <div class="topinfo text-center">
        <h2>所有产品</h2>
        <p>以品质造就品牌为客户带来温暖</p>
      </div>
      <div class="info-tag">
         <?php
                $result = mysql_query("select * from categori");
            while($row = mysql_fetch_array($result))
              {
            ?>
          <div class="item info-tab-item" data-id="<?= $row['categori_id']?>"><?= $row['categori_name']?></div>
           <?php };?>
      </div>
  <div class="container">

    <div class="row pro-list">
    

    <?php
        $sql = "select * from products";
        $cate = $_GET['cate'];

        if($cate){
            $sql = $sql. " where categori_id='$cate'";
        }
        if($page_name=='index'){
          $sql = $sql. " limit 3";
        }
        $result = mysql_query($sql);
        
    while($row = mysql_fetch_array($result))
      {
    ?>

    <div class="col-md-4 col-12 pro animated">
        <div class="product-item">
          <div class="top-view">
            <div class="name"><?= $row['Pdnamecn']?></div>
            <div class="sub-name s-font"><?= $row['Pdname']?></div>
            <span class="icon-box logo"><i class="iconfont icon-icon19"></i></span>
          </div>
          <div class="pro-img">
            <img src="<?= IMG_HOST?>products/<?= $row['Pdsphoto']?>" alt="">
          </div>
          <div class="bt-view clearfix">
            <span class="type s-font"><?= $row['Pdmodel']?></span>
            <a href="detail.php?id=<?= $row['PdID']?>" class="btn">更多信息<i class="iconfont icon-iconfontjiantou"></i></a>
          </div>
        </div>
      </div>
    <?php };?>
    </div>
  </div>
</div>
<script id="products" type="text/html">
    {{each}}
    <div class="col-md-4 col-12 pro animated">
        <div class="product-item">
          <div class="top-view">
            <div class="name">{{$value.Pdnamecn}}</div>
            <div class="sub-name s-font">{{$value.Pdname}}</div>
            <span class="icon-box logo"><i class="iconfont icon-icon19"></i></span>
          </div>
          <div class="pro-img">
            <img src="<?= IMG_HOST?>products/{{$value.Pdsphoto}}?>" alt="">
          </div>
          <div class="bt-view clearfix">
            <span class="type s-font">{{$value.Pdmodel}}</span>
            <a href="detail.php?id={{$value.PdID}}" class="btn">更多信息<i class="iconfont icon-iconfontjiantou"></i></a>
          </div>
        </div>
      </div>
    {{/each}}
</script>
